import React, { FC, useRef } from 'react';
import TabBar from '../../../components/tab-bar';
import Registration from '../../../components/registration';
import { useHistory } from 'react-router-dom';

// 商家注册页
const MerRegistration: FC = props => {
    const infoRef = useRef<any>();
    const history = useHistory();
    return (
        <div>
            <TabBar goBack={() => { console.log("商家返回") }} regText="商家注册" cenText="商家中心" />
            <Registration 
                registration={() => { 
                    history.push({
                        pathname:'/merLogReg/storeInformation',
                        state: infoRef.current.getFieldValue()
                    })
                 }} 
                btnText="下一步" 
                ref={infoRef}
            />
        </div>
    )
}
export default MerRegistration;
